/**
 * Created by hxpeng on 2017/4/28.
 */
(function () {
    'use strict';

    angular.module('App.pages.bind', ['App.pages.member'])
        .config(routeConfig);

    function routeConfig($stateProvider,$urlRouterProvider) {
        $stateProvider.state('bind', {
            url: "/bind",
            abstract: true,
            templateUrl: 'source/pages/page-tab.html',
        }).state('bind.menu', {
            url: "/menu",
            cache: false,
            views: {
                'kinder-view': {
                    templateUrl: 'source/pages/bind/bind-menu.html',
                    controller:'BindCtrl as vm',
                }
            }
        }).state('bind.createParent', {
            url: "/createParent",
            cache: false,
            views: {
                'kinder-view': {
                    templateUrl: 'source/pages/bind/create-parent.html',
                    controller:'CreateParentCtrl as vm',
                }
            }
        }).state('bind.bindTeacherInfo', {
            url: "/bindTeacherInfo",
            cache: false,
            views: {
                'kinder-view': {
                    templateUrl: 'source/pages/bind/bind-teacher.html',
                    controller:'BindTeacherCtrl as vm',
                }
            }
        }).state('bind.bindConfirm', {
            url: "/bindConfirm",
            cache: false,
            views: {
                'kinder-view': {
                    templateUrl: 'source/pages/bind/bind-confirm.html',
                    controller:'BindConfirmCtrl as vm'
                }
            }
        }).state('bind.bindResult', {
            url: "/bindResult",
            cache: false,
            views: {
                'kinder-view': {
                    templateUrl: 'source/pages/bind/bind-result.html',
                    controller:'BindCtrl as vm'
                }
            }
        }).state('bind.createResult', {
            url: "/createResult",
            cache: false,
            views: {
                'kinder-view': {
                    templateUrl: 'source/pages/bind/create-result.html'
                }
            }
        });

        $urlRouterProvider.otherwise('/pageNotFound');
    }
})();